# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-psrpcore
_pkgname=psrpcore
pkgver=0.3.1
pkgrel=1
pkgdesc='Core Library for the PowerShell Remoting Protocol.'
arch=('any')
url='https://pypi.org/project/psrpcore/'
license=('MIT')
depends=('python' 'python-cryptography')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e4378812c9ed98a9a98bb84c0a7ab824cc1d795a1477429e3e594d9087d2ad5c50645d94923b2ac7579afccd93f77c82102da8a865e8ab418ebc0c8e78f5cc58')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    "$_pkgname"
}

